Limited accessed Shared Directory
2013/07/04 |
Create a shared directory that requires user authentication.
For example, create a group "security" and configure Samba that
users in "security" group can access to a limited folder with authentication.
|
|
[1] | Configure Samba |
[root@lan ~]# groupadd security [root@lan ~]# mkdir /home/security [root@lan ~]# chgrp security /home/security [root@lan ~]# chmod 770 /home/security
[root@lan ~]#
vi /etc/samba/smb.conf # line 98: uncomment max protocol = SMB2 # line 125: add security = user
map to guest = Never
# add at the last line [Security]
# any name you like path = /home/security writable = yes create mode = 0770 directory mode = 0770 share modes = yes guest ok = no # guest not allowed valid users = @security # allow only "security" group systemctl restart smb.service [root@lan ~]# smbpasswd -a fedora # add smb user New SMB password: # set password Retype new SMB password: # confirm Added user fedora. [root@lan ~]# usermod -G security fedora |
[2] | Configure on Windows client. This example is on Windows 7. Select [My Computer] - [Map Network Drive] like following example. |
[3] | Specify shared folder's place in Folder section like example and Click 'Finish' button to enter. |
[4] | Password is required. Input the one set in [1]. |
[5] | Just accessed. |